1. Technical Field
The present invention is directed to image processing for transforming a binary dot-matrix image to a gray dot-matrix image, and more particularly to a method and system for generating a gray dot-matrix font from an existing binary dot-matrix font.
2. Description of the Related Art
Many font generating systems exist for generating Asian character fonts (“Asian fonts”). An Asian font is composed of a large number of ideographs that represent the characters in the Asian language. Asian languages may include thousands of characters. For example, the Chinese language includes over twenty-thousand distinct characters.
One conventional computer technique for generating character patterns in an Asian font uses font outlines. This system is described in “PostScript Language Tutorial and Cookbook” by Adobe Systems, Inc. (Addison-Wesley Publishing, 1985). In this method, the outline of a character pattern is stored as a collection of straight lines and curves. There are some disadvantages associated with this technique. First, because different font outlines must be defined and stored for tens of thousands of different characters, the memory requirement is relatively high. Second, the font outlines that are stored in high resolution are suited for display only in high resolution; they are not suited for high-quality display in relatively low resolution.
Another method of generating an Asian font uses stroke-based character pattern data, wherein each stroke within a character is separately defined. A character typically consists of multiple strokes that overlap or intersect with each other. The stroke-based character data consist of key points, width values, feature points, and curve ratios, which together define the outline of each stroke. The construction and rendering of the stroke-based character data are described in detail in U.S. Pat. Nos. 5,852,448, 6,151,032, and 6,157,390, which are explicitly incorporated by reference herein. The stroke-based technique is suited for reducing the memory requirements for fonts. Further, the stroke-based character font can be adjustably displayed, always in high quality, in both high resolution and low resolution.
Yet another method of generating an Asian font uses glyph-based character pattern data, wherein each glyph within a character is separately defined. An Asian character typically consists of one or more glyphs, each of which in turn consists of one or more strokes. For example, several strokes in a character that intersect or overlap with each other often create a complicated overall geometric shape, which is a glyph. In the glyph-based technique, each glyph is defined in terms of key points, width values, feature points, and curve ratios, as in the stroke-based technique described above. The construction and rendering of the glyph-based character pattern data are described in detail in U.S. Pat. Nos. 6,501,475 and 6,661,417, which are explicitly incorporated by reference herein.
Still another method of generating a set of Asian fonts for display in gray scale is known, wherein each character comprises one or more strokes/glyphs, and each stroke/glyph is defined in silhouette-oriented representation. The construction and rendering of the silhouette-oriented representation for display in gray scale is described in detail in U.S. Pat. No. 7,199,797, incorporated by reference herein.
In a broad sense, various fonts described above, including stroke/glyph-based fonts, are all “outline fonts,” in that they store or define outlines of characters or outlines of strokes/glyphs that form the characters.
Standard font engines are capable of receiving an outline font and rendering (displaying) the outline font in the form of a dot-matrix image on dot-matrix screens having various resolution levels. With the advancement of screen display technology, text can now be displayed as a gray level dot-matrix image on the screen of cellular phones, PDAs, portable digital audio/visual devices, and other electronic devices. Previously, characters were rendered on a binary dot-matrix screen, which displayed each pixel as either black or white. For example, if more than 50% of a pixel area is occupied by an outline of a character, then the pixel is activated (black), and if not the pixel is not activated (white). On the other hand, a gray level (or gray dot-matrix) screen is capable of displaying each pixel at any gray level (or gray value) ranging from black (0) through white (255). Briefly, a typical method of rendering a character on a gray level screen entails, for each display pixel onto which the character falls, determining what portion of each pixel is occupied by the character. Specifically, the method determines an area A1 occupied by the character and an area A2 unoccupied by the character, wherein A1+A2=total area of 1 pixel. Then, the gray value for the pixel can be calculated as follows:Gray Value=(A1×black+A2×white)/(A1+A2)  (Eq. 1)
Various other calculation methods exist for obtaining a gray value for a particular pixel.
However, rendering those font characters that are originally defined for a binary dot-matrix screen on a gray dot-matrix screen often causes severe degradation of the resulting text image. This is particularly true with Asian characters, which tend to have relatively more complicated overall geometric shapes.
Some software tools have been developed to help the construction of a gray dot-matrix font from an existing binary dot-matrix font. One example is an interactive man-machine interface software tool, which accepts an existing binary dot-matrix image font that is formed as a collection of dots, and generates a corresponding outline font which, when input to a standard font engine, generates (displays) a character image on a binary dot-matrix screen that is substantially the same as the original binary dot-matrix image. The tool then allows a font designer to modify the generated outline font shape manually to generate a new outline font that is suited for rendering a gray dot-matrix character image on a gray dot-matrix screen. Basically, a tool of this kind allows a font designer to first construct an outline font shape based on an existing binary dot-matrix image font, and then to modify the constructed outline font shape as a reference shape to obtain a gray dot-matrix outline font which, when input to a font engine, produces a gray dot-matrix character image on a gray dot-matrix screen. However, this approach is labor intensive and time consuming.
A need exists for a method and system for automatically or semi-automatically transforming a binary dot-matrix font to a gray dot-matrix font.